<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%String path = request.getContextPath(); %>
<script type='text/javascript'>
           var result = '${result}';
	       if(result =='success'){
	          alert("登录成功");
	          window.location = "<%=path%>/index.jsp";
	       }
	       if(result=='faild'){
	          alert("用户名或密码不对！");
	          window.location = "<%=path%>/login.jsp";
	       }
	       if(result=='loginOutSuccess'){
	          alert("退出成功");
	          window.location = "<%=path%>/login.jsp";
	       }
	       if(result=='reLogin'){
	          alert("请重新登录");
	          window.location = "<%=path%>/login.jsp";
	       }

	   
</script>